//我的客服

import 'package:flutter/material.dart';

class MyService extends StatelessWidget {
  const MyService({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        backgroundColor: Colors.white,
        title: Text("我的客服"),
        titleTextStyle: TextStyle(
          color: Colors.black,
          fontSize: 26,
        ),
        leading: Container(
          child:GestureDetector(
            onTap: (){
              Navigator.pop(context);
            },
            child: Icon(Icons.arrow_circle_left,color: Colors.blue,size: 40),
          ),
        ),
      ),
      body: const IndexService(),
    );
  }
}

class IndexService extends StatefulWidget {
  const IndexService({Key? key}) : super(key: key);

  @override
  State<IndexService> createState() => _IndexServiceState();
}

class _IndexServiceState extends State<IndexService> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,

      child: Column(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: [
          Container(
            margin: EdgeInsets.fromLTRB(12, 0, 12, 0),
            decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(18)),
              color: Colors.black12,
            ),
            height: 200,
            width: double.infinity,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  alignment: Alignment.center,
                  width: double.infinity,
                  height: 40,
                  margin: EdgeInsets.all(0),
                  child: Text(
                    "最新公告",
                    style: TextStyle(
                      fontSize: 26
                    ),
                  ),
                ),
                Container(
                  width: double.infinity,
                  height: 130,
                  margin: EdgeInsets.all(8),
                  child: Text(
                    " 内容",
                    style: TextStyle(fontSize: 18),
                    overflow: TextOverflow.clip,
                    textDirection: TextDirection.ltr,
                  ),
                ),
              ],
            ),
          ),
          Container(
            // height: 320,
            width:double.infinity,
            decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(18)),
              color: Colors.black12,
              border: Border.all(
                width: 1,
                color: Colors.black38
              )
            ),
            margin: EdgeInsets.fromLTRB(12, 0, 12, 0),
            child: Column(
              children: [
                //标题
                Container(
                  child: Text("常见问题",style: TextStyle(fontSize: 18),),
                  width: double.infinity,

                  padding: EdgeInsets.all(12),
                  decoration: BoxDecoration(
                    border: Border(bottom: BorderSide(
                      color: Colors.black38,
                      width: 1,
                    ))
                  ),
                ),
                GestureDetector(
                  onTap: (){

                  },
                  child: Container(
                    alignment: Alignment.center,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Text("常见问题1",style: TextStyle(fontSize: 18),),
                        Container(
                          padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
                          child: Icon(Icons.keyboard_arrow_right,size: 30,),
                        )
                      ],
                    ),
                    width: double.infinity,
                    padding: EdgeInsets.all(12),
                    decoration: BoxDecoration(
                        border: Border(bottom: BorderSide(
                          color: Colors.black38,
                          width: 1,
                        ))
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: (){

                  },
                  child: Container(
                    alignment: Alignment.center,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Text("常见问题2",style: TextStyle(fontSize: 18),),
                        Container(
                          padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
                          child: Icon(Icons.keyboard_arrow_right,size: 30,),
                        )
                      ],
                    ),
                    width: double.infinity,
                    padding: EdgeInsets.all(12),
                    decoration: BoxDecoration(
                        border: Border(bottom: BorderSide(
                          color: Colors.black38,
                          width: 1,
                        ))
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: (){

                  },
                  child: Container(
                    alignment: Alignment.center,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Text("常见问题3",style: TextStyle(fontSize: 18),),
                        Container(
                          padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
                          child: Icon(Icons.keyboard_arrow_right,size: 30,),
                        )
                      ],
                    ),
                    width: double.infinity,
                    padding: EdgeInsets.all(12),
                    decoration: BoxDecoration(
                        border: Border(bottom: BorderSide(
                          color: Colors.black38,
                          width: 1,
                        ))
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: (){

                  },
                  child: Container(
                    alignment: Alignment.center,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Text("常见问题4",style: TextStyle(fontSize: 18),),
                        Container(
                          padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
                          child: Icon(Icons.keyboard_arrow_right,size: 30,),
                        )
                      ],
                    ),
                    width: double.infinity,
                    padding: EdgeInsets.all(12),
                    decoration: BoxDecoration(
                        border: Border(bottom: BorderSide(
                          color: Colors.black38,
                          width: 1,
                        ))
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: (){

                  },
                  child: Container(
                    alignment: Alignment.center,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Text("常见问题5",style: TextStyle(fontSize: 18),),
                        Container(
                          padding: EdgeInsets.fromLTRB(0, 4, 0, 0),
                          child: Icon(Icons.keyboard_arrow_right,size: 30,),
                        )
                      ],
                    ),
                    width: double.infinity,
                    padding: EdgeInsets.all(12),
                  ),
                ),
              ],
            ),
          ),
          //按钮
          Container(
            width: double.infinity,
            margin: EdgeInsets.all(8),
            child: ElevatedButton(
              onPressed: (){

              },
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Container(
                    margin: EdgeInsets.all(4),
                    height: 20,
                    alignment: Alignment.center,
                    child:Icon(Icons.headset_mic),
                  ),
                  Text(
                      "联系客服",
                    style: TextStyle(fontSize: 20),
                  ),
                ],
              ),
              style: ButtonStyle(
                  fixedSize: MaterialStateProperty.all(
                      Size(double.infinity, 64)
                  ),
              ),
            ),
          )
        ],
      ),
    );
  }
}

